<template>
    <v-card height="100%">
        <v-file-input v-model="datafile"
                      accept=".json"
                      @change="onSelectFile"
                      label="导入初始化json配置文件">
        </v-file-input>
    </v-card>

</template>

<script>
    import {copyFile} from '../utils/datastore'

    export default {
        name: "HomePage",
        data: () => ({
            datafile: {}
        }),
        methods:{
            onSelectFile(){
                if(this.datafile){
                    copyFile(this.datafile.path)
                    this.$dialog.notify.info('data.json文件成功加载', {
                        position: 'bottom-right',
                        timeout: 5000
                    })
                }
            }
        }
    }
</script>

<style scoped>

</style>